﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" CodeBehind="Details.aspx.cs" Inherits="Mani.Common.UI.Details" %>


<asp:Content ID="headContent" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">

     <h3 class="ui-widget-header">
            جزییات 
            <%= table.DisplayName%>
    </h3>

    <div class="ui-layout-content ui-widget-content">

        <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true">
            <DataControls>
                <asp:DataControlReference ControlID="FormView1" />
            </DataControls>
        </asp:DynamicDataManager>


        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
                    HeaderText="List of validation errors" CssClass="DDValidator" />
                <asp:DynamicValidator runat="server" ID="DetailsViewValidator" ControlToValidate="FormView1" Display="None" CssClass="DDValidator" />

                <asp:FormView runat="server" ID="FormView1" DataSourceID="DetailsDataSource" OnItemDeleted="FormView1_ItemDeleted" RenderOuterTable="false">
                    <ItemTemplate>
                        <table id="detailsTable" class="DDDetailsTable" cellpadding="6">
                            <asp:DynamicEntity runat="server" />
                            <tr class="td">
                                <td colspan="2">
                                    <asp:DynamicHyperLink runat="server" Action="Edit" Text="ویرایش" />
                                    <asp:LinkButton runat="server" CommandName="Delete" Text="حذف"
                                        OnClientClick='return confirm("آیا نسبت به حذف این آیتم اطمینان دارید؟");' />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <div class="DDNoItem">آیتمی وجود ندارد</div>
                    </EmptyDataTemplate>
                </asp:FormView>

                <asp:EntityDataSource ID="DetailsDataSource" runat="server" EnableDelete="true" />

                <asp:QueryExtender TargetControlID="DetailsDataSource" ID="DetailsQueryExtender" runat="server">
                    <asp:DynamicRouteExpression />
                </asp:QueryExtender>

                <br />

                <div class="DDBottomHyperLink">
                    <asp:DynamicHyperLink ID="ListHyperLink" runat="server" Action="List">نمایش همه آیتم ها</asp:DynamicHyperLink>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>

    </div>
</asp:Content>

